package com.fit.pianosheetshop.service;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.fit.pianosheetshop.interfaces.Sheet;



public class SheetsBean implements Sheets{
	private Map<String, Sheet> sheets = new HashMap<String, Sheet>();

	public Collection<Sheet> retrieve() {
		return sheets.values();
	}

	public Sheet save(Sheet sheet) {
		return sheets.put(sheet.getTitle(), sheet);
	}

	public Sheet retrieveSingleSheet(String title) {
		return sheets.get(title);
	}

}
